import React, {Component} from 'react';

import {connect} from 'react-redux'

const videojs = window.videojs;
class VideoPlay extends React.Component {
    constructor(props) {
        super(props);
    }

    componentDidMount() {
        let videoWrapper = "testVideoWrapper";
        let videoBox = "testVideoBox";
        let player = videojs(videoBox);
        player.play();

    }

    render() {
        console.log("测试视频监控")
        return (
            <div>
                <h3>实时监控2</h3>
                <div id="testVideoWrapper" style={{width: 300, height: 200}}>
                    <video-js id="testVideoBox" className="vjs-default-skin" controls width="300" height="200">
                        <source
                            src="http://218.77.107.71:6713/mag/hls/86c7e028e7904878997f101d9f088371/1/live.m3u8"
                            type="application/x-mpegURL"/>
                    </video-js>
                </div>
            </div>
        );
    }

}


export default VideoPlay;